import QtQuick
import QtQuick.Controls

ApplicationWindow {
    visible: true
    width: 800
    height: 600
    title: "State 示例"

    SwipeView {
        id: swipeView
        anchors.fill: parent

        Item {
            Column {
                spacing: 20
                anchors.centerIn: parent

                Text {
                    text: "切换状态"
                    font.pixelSize: 24
                    anchors.horizontalCenter: parent.horizontalCenter
                }

                SwitchState {
                    anchors.horizontalCenter: parent.horizontalCenter
                }
            }
        }

        Item {
            Column {
                spacing: 20
                anchors.centerIn: parent

                Text {
                    text: "多个Property"
                    font.pixelSize: 24
                    anchors.horizontalCenter: parent.horizontalCenter
                }

                MultiProperty {
                    anchors.horizontalCenter: parent.horizontalCenter
                }
            }
        }

        Item {
            Column {
                spacing: 20
                anchors.centerIn: parent

                Text {
                    text: "When条件"
                    font.pixelSize: 24
                    anchors.horizontalCenter: parent.horizontalCenter
                }

                WhenState {
                    anchors.horizontalCenter: parent.horizontalCenter
                }
            }
        }
    }
}
